package com.xbongbong.pro.log.pojo;

import com.alibaba.fastjson.JSONArray;
import com.xbongbong.pro.statistic.result.pojo.TitlePojo;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.List;

/**
 * 日志详情pojo
 * @author zcp
 * @version v1.0
 * @date 2019/7/9 16:39
 * @since v1.0
 */
@Getter
@Setter
@ToString
public class DetailLogDataPojo implements Serializable {
    private static final long serialVersionUID = 1482054432827857805L;


    /**
     * tab名，如“导入数据”
     */
    private String tab;

    /**
     * 标题，格式为：[{"key": "name","value": "更改字段"}]
     */
    private List<TitlePojo> title;
    /**
     * 更改详情，格式为：[{"name":"客户名称"}]
     * key依赖于title数组内对象的key对应的值，比如"name"即title内key对应的值
     */
    private JSONArray data;

    public DetailLogDataPojo(List<TitlePojo> title, JSONArray data) {
        this.title = title;
        this.data = data;
    }

    public DetailLogDataPojo(String tab, List<TitlePojo> title, JSONArray data) {
        this.tab = tab;
        this.title = title;
        this.data = data;
    }
}
